// $Id: routingentry.h 72 2004-12-02 15:03:28Z jonas $
#ifndef ROUTINGENTRY_H
#define ROUTINGENTRY_H

class Node;

/**
 * This class stores information about an entry in a routing table.
 */
class RoutingEntry
{
public:
	RoutingEntry(Node *node, unsigned int hash) : m_node(node), m_hash(hash) {}

	/**
	 * This operator is here to let us search for file hashes in the routing
	 * table. We have no interest in what nodes are stored together with the
	 * hashes at this point.
	 *
	 * @param re The other RoutingEntry object to compare to
	 * @returns True if the hash matches, false otherwise
	 */
	bool operator==(const RoutingEntry &re) const {
		return m_hash==re.m_hash;
	}

	Node *m_node;
	unsigned int m_hash;
};

#endif
